html, body {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden; 
    -webkit-text-size-adjust: 100%;
}

.back-link {
    display: inline-block;
    padding: 0.5rem 0.75rem; 
    background-color: #f2f2f2;
    color: #000000;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.875rem; 
    border-radius: 4px;
    margin-top: 25px;    
    margin-left: 30px;   
    margin-bottom: 10px;
    transition: background-color 0.2s ease;
}

/* Page detail and article containers */
.rg-item {
    max-width: 900px;
    margin: 0 auto;
}

.rg-hero img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.rg-block {
    margin: 18px 0;
}

/* General body layouts */
.item_text {
    text-align: center; 
    padding: 0 1rem; 
    font-size: clamp(1rem, 2.2vw, 1.25rem); 
    line-height: 1.6;
    margin-bottom: 15px; 
}

img, .rg-inline-image {
    max-width: 90% !important; 
    width: auto !important;
    height: auto !important;
    margin: 15px auto !important;
}

/* Main Dashboard Title */
.info-container h1 {
    font-family: "Inter", sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-align: center;
    color: #000000;
    margin-bottom: 20px;
    font-weight: 700;
}
.info-container p {
    text-align: center;

}


/* Inline media item layout styles */
.rg-media {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.rg-media img {
    max-width: 45%;
    border-radius: 6px;
}

.rg-media-right .rg-media img {
    order: 2;
}

.rg-media-body {
    flex: 1;
}

/* ==========================================================================
   2. DESKTOP GRID & CARD LAYOUT (DEFAULT VIEW)
   ========================================================================== */

/* THE PARENT GRID: Stacks strip banner blocks down the center of the screen */
.rg-grid {
    display: flex !important;
    flex-direction: column !important; 
    align-items: center !important;     
    justify-content: center !important;
    gap: 20px; 
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    margin-top: 12px;
}

/* THE CARD STRIP: Centered elegant desktop item banner */
.rg-card-strip {
    display: flex !important;
    flex-direction: row !important;        
    justify-content: space-between !important; 
    align-items: center !important;        
    
    width: 100%;
    max-width: 750px;           
    
    padding: 24px 20px !important;
    margin: 0 auto !important;
    
    border: 2px solid #504b4b !important; 
    border-radius: 6px !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    
    height: auto !important; 
    min-height: 0 !important;
}

/* Clean strip list thumb elements */
.rg-thumb img {
    width: 120px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
}

.rg-icon img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
}

/* Text block grouping formatting */
.rg-card-text-group, .rg-strip-body {
    display: flex;
    flex-direction: column; 
    align-items: flex-start;    
    text-align: left;           
    flex: 1;                    
    padding-right: 20px;
}

/* Card item typography configurations */
.rg-title {
    margin: 0 0 6px 0 ;          
    font-family: "Inter", sans-serif;
    color: black;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    text-decoration: none;
    text-align:center;


}

.rg-card p, .rg-summary, .info_description {
    margin: 0 !important;                  
    font-family: "Inter", sans-serif;
    font-weight: 400;
    color: black;
    font-size: clamp(0.813rem, 1.8vw, 0.938rem);
    line-height: 1.4;
}

/* Desktop action CTA button placement */
.view-more-btn, .btn {
    display: inline-block;
    padding: 0.625rem 1.25rem; 
    background-color: #003366; 
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 0.875rem; 
    white-space: nowrap;   
}


@media (max-width: 700px) {
    .rg-media {
        flex-direction: column;
    }
    
    .rg-media img {
        max-width: 100%;
    }
    
    /* ELIMINATES INFINITE SCROLL & SIDEWAYS WOBBLE ON MOBILE VIEWPORTS */
    .rg-page, .rg-page-shell, .rg_item_container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 10px 0 15px 0 !important; /* Heavily compressed bottom container height padding */
        box-sizing: border-box ;
        height: auto !important; 
        min-height: 0 !important;
        max-height: none !important;
        overflow: hidden !important; /* Snaps dynamic height rendering box exactly where elements finish */
    }
    .rg-card-strip{
        background-color: #f0f0f0 !important;
    }

    .back-link {
        margin-left: 5px; 
        margin-top: 5px;
        background-color: #ffffff; 
        color: #4e0909;
        font-family: 'Inter', sans-serif;
        font-weight: 550;
        font-size: 0.875rem; 
        border-radius: 4px;
        display: inline-block; 
    }

    /* THE SNUG MOBILE CARD SETTING */
   .rg-card-strip {
        display: flex !important;
        flex-direction: row !important; 
        justify-content: space-between !important;
        align-items: center !important;
        
        width: 92% !important;          
        margin: 10px auto !important;   
        padding: 12px 16px !important;  
        
        /* Swapped to a premium, soft grey canvas backing for clean contrast */
        background-color: #f7f7f9 !important; 
        
        /* Fixed syntax error: Made the border a soft off-white/light grey so it is barely visible */
        border: 2px solid #8d8888 !important; 
        
        box-sizing: border-box !important;
        height: auto !important;
        border-radius: 6px !important; /* Kept corners rounded for a clean card format */
    }
  
.rg-card p, 
.rg-summary, 
.rg-card-text-group p {
    text-align: center !important; /* Centers the actual text rows */
    align-self: center !important; /* Forces the flex element to balance in the middle */
    margin: 0 auto !important;     /* Centers the block width boundaries */
}

/* Fixes the text group container so items can align down the middle line */

.rg-card-text-group, .rg-strip-body {
    align-items: center !important; /* Changes left alignment to perfect center tracking */
    text-align: center !important;
    width: 100% !important; /* Spans full width so text has space to center shift */
    padding-right: 0 !important; /* Removes desktop right padding causing off-center tilt */
}

/* Forces the title element to fill the layout block */
.rg-card h3, .rg-title {
    width: 100% !important;
    font-size: 1rem !important; 
    margin-bottom: 4px !important; 
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-align: center !important; 
}
    .rg-card p, .rg-summary {
        font-size: 0.813rem !important; 
        display: block !important; 
    }

    /* HIDDEN ELEMENTS FOR PROFESSIONAL MOBILE SCREEN PROTECTION */
    .rg-action, .btn, .view-more-btn {
        display: none !important;
    }
    .rg-card-strip .rg-card-icon img,
    .rg-card-strip .rg-icon img {
        width: 20px !important;       /* Shrunk down to ultra-compact size */
        max-width: 20px !important;
        height: 20px !important;
        margin: 0 !important;
    }

    /* Tighten the spacing gap to keep it close to the text */
    .rg-card-icon, .rg-icon {
        padding-right: 8px !important; 
    }

     .rg-card-strip {
        position: relative !important; /* Establishes a boundary box for the link layer */
        cursor: pointer !important;
    }

    /* 2. STRETCH THE CLICKABLE LINK AREA ACROSS THE WHOLE CARD BACKING */
    .rg-card-strip .btn::after {
        content: "" !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 5 !important; /* Floats the link click boundary over the text and icons */
    }

    /* 3. OPTIONAL: Subtle tap feedback when the user clicks the mobile card background */
    .rg-card-strip:active {
        background-color: #f0f0f3 !important; /* Deepens the soft grey backing fractionally on press */
    }
}
.rg-card-strip .rg-title a,
.rg-card h3 a {
    text-decoration: none !important;
    color: #333333 !important; /* Keeps the title charcoal instead of blue */
}

/* Double-check protection directly on the text wrappers */
.rg-title, .rg-card h3 {
    text-decoration: none !important;
}
.rg-card-strip .rg-card-icon img,
.rg-card-strip .rg-icon img {
    width: 30px !important;       /* Locks the width down completely */
    max-width: 30px !important;   /* Breaks the global 600px mobile rule */
    height: 30px !important;      /* Forces a perfect square */
    object-fit: contain !important; /* Prevents the image from being squished */
    
    /* Strip out layout wrappers from global content rules */
    margin: 0 !important; 
    box-shadow: none !important; 
    border-radius: 0 !important; 
    display: inline-block !important;
}

/* 2. Style the left alignment spacing around the icon wrapper container */
.rg-card-icon, .rg-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;    /* Stops flexbox from crushing the icon on small rows */
    padding-right: 14px !important; /* Clean spacing gap before the text begins */
}

/* 3. Re-align text to the left so it reads nicely right next to the icon */
.rg-card-text-group, .rg-strip-body {
    text-align: left !important;
    align-items: flex-start !important;
}